//==========================================================================
// Copyright (c) 2000-2006,  Elastos, Inc.  All Rights Reserved.
//==========================================================================
#include <string.h>

char *  __cdecl strpbrk(const char *s1, const char *s2)
{
    const char *scanp;
    int c, sc;

    while ((c = *s1++) != 0) {
        for (scanp = s2; (sc = *scanp++) != 0;) {
            if (sc == c) {
                return ((char *) (s1 - 1));
            }
        }
    }
    return 0;
}

wchar_t *  __cdecl wcspbrk(const wchar_t *s1, const wchar_t *s2)
{
    const wchar_t *scanp;
    int c, sc;

    while ((c = *s1++) != 0) {
        for (scanp = s2; (sc = *scanp++) != 0;) {
            if (sc == c) {
                return ((wchar_t *) (s1 - 1));
            }
        }
    }
    return 0;
}
